
/***********************************************************************
 * TimeReport class
 * 
 * Implements a simple observer for the clock to report the current time
 *
 * Signature:
 *  public static TimeReporter create ();
 *  public void notify (Integer time);
 ***********************************************************************/

public class TimeReporter implements Observer<Integer> {

    private TimeReporter () { }

    public static TimeReporter create () {
	return new TimeReporter();
    }

    public void notify (Integer i) {
	System.out.println ("clock reports -- time is now " + i);
    }

}